package org.example.service;

import org.example.annotations.HttpMethod;
import org.example.annotations.QueryParam;
import org.example.annotations.RequestBody;
import org.example.pojo.TestAopBody;
import org.springframework.stereotype.Service;

/**
 * @author wxm
 * @date 2025/2/26 9:30
 */
@Service
public interface TestHttpMethod {
    @HttpMethod(url = "http://127.0.0.1:8080/api/testGetUrl", method = "GET")
    String testHttpGet(@QueryParam("fileName") String fileName);

    @HttpMethod(url = "http://127.0.0.1:8080/api/testPostUrl", method = "POST", contentType = "application/x-www-form-urlencoded")
    String testHttpPost(@QueryParam("fileName") String fileName, @QueryParam("url") String url);

    @HttpMethod(url = "http://127.0.0.1:8080/api/testBody", method = "POST", contentType = "application/json")
    String testHttpBody(@RequestBody TestAopBody testAopBody);
}
